<div class="layui-fluid layui-anim website-anim-up" id="website-commitment-add" lay-title="承诺书内容新增">
    <div class="layui-row layui-col-space8 website-container">
        <div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
            <form class="layui-form" lay-filter="class-apply-project-add-form" id="class-apply-project-add-form">
                <div class="layui-form-item">
                    <div class="layui-row">
                        <!-- 基本信息-->
                        <div class="website-hide">
                            <label class="layui-form-label">id</label>
                            <div class="layui-input-block">
                                <input type="text" name="commitmentId" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-inline layui-col-xs5 layui-col-sm5 layui-col-md12">
                            <label class="layui-form-label layui-form-label">承诺书内容</label>
                            <div class="layui-input-block">
                                <textarea class="layui-textarea" name="context" readonly
                                          autocomplete="off">[[${commitment != null ? commitment :''}]]</textarea>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item website-hide">
                    <button type="reset" class="layui-btn" id="reset">返回</button>
                </div>
            </form>
        </div>
    </div>
</div>

<script data-th-inline="none" type="text/javascript">
    layui.use(['dropdown', 'jquery', 'laydate', 'form', 'website', 'table', 'validate'], function () {
        let $ = layui.jquery,
            laydate = layui.laydate,
            website = layui.website,
            form = layui.form,
            validate = layui.validate,
            formSelects = layui.formSelects,
            dropdown = layui.dropdown,
            table = layui.table,
            $view = $('#website-commitment-add'),
            $submit = $('#submit');
        // 重新渲染 form否则不会显示下拉框
        form.render();
        //初始化时间


        form.on('submit(commitment-add-submit)', function (data) {
            website.post(ctx + 'biz/commitment/add', data.field, function () {
                layer.closeAll();
                $('#website-commitment').find('#query').click();
            });
            return false;
        });


    })


</script>